package com.lianxi.apicount;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo/aop")
public class CountHelloController {


    @GetMapping("hello")
    public String hello(String name) {
        return "hello World!";
    }

    @GetMapping("hello2")
    public String hello2(String name) {
        int i = 1 / 0;
        return "hello World!";
    }

    @GetMapping("error")
    public String error() {
        int i = 1 / 0;
        return "测试报错的AOP方法";
    }
}
